<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Phalanx Holding | Change Password</title>
    <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
    <!-- Bootstrap 3.3.4 -->
    <link href="__PUBLIC__/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <!-- Font Awesome Icons -->
    <link href="__PUBLIC__/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css" />
    <!-- Theme style -->
    <link href="__PUBLIC__/dist/css/AdminLTE.min.css" rel="stylesheet" type="text/css" />
    <!-- iCheck -->
    <link href="__PUBLIC__/plugins/iCheck/square/blue.css" rel="stylesheet" type="text/css" />

    <link rel="stylesheet" href="__PUBLIC__/dist/css/bootstrapValidator.css"/>
    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
    <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>

<body class="login-page">
<div class="login-box">
    <div class="login-logo">
        <a href="#"><b>Phalanx</b>Holding</a>
    </div><!-- /.login-logo -->
    <div class="login-box-body widget-box visible"  id="login-box">
        <p class="login-box-msg">First login required to modify the initial password</p>
        <form action="__URL__/changeInitialPassword/" method="post" id="loginForm">
            <div class="form-group has-feedback">
                <input type="password" name="password" class="form-control" placeholder="Please enter your  new password"/>
                <input type="hidden" name="account" value="{$account}" />
                <span class="glyphicon glyphicon-lock form-control-feedback"></span>
            </div>
            <div class="form-group has-feedback">
                <input type="password" name="confirmPassword" class="form-control" placeholder="Please enter your  confirmPassword" />
                <span class="glyphicon glyphicon-lock form-control-feedback"></span>
            </div>
            <div class="row">
                <div class="col-xs-8">
                </div>
                <div class="col-xs-4">
                    <button type="submit" class="btn btn-primary btn-block btn-flat">Change</button>
                </div>
            </div>
        </form>
    </div><!-- /.login-box-body -->
</div><!-- /.login-box -->

<!-- jQuery 2.1.4 -->
<script src="__PUBLIC__/plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.2 JS -->
<script src="__PUBLIC__/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>

<script src="__PUBLIC__/dist/js/bootstrapValidator.js" type="text/javascript"></script>
<script src="__PUBLIC__/dist/js/language/zh_CN.js" type="text/javascript"></script>
<script src="__PUBLIC__/dist/js/validator.js" type="text/javascript"></script>

<script type="text/javascript">

    $(document).ready(function() {
        $('#loginForm').bootstrapValidator({
            message: 'This value is not valid',
            feedbackIcons: {
                valid: 'glyphicon glyphicon-ok',
                invalid: 'glyphicon glyphicon-remove',
                validating: 'glyphicon glyphicon-refresh'
            },
            fields: {
                password: {
                    validators: {
                        notEmpty: {
                            message: 'Password can not be empty'
                        },
                        regexp: {
                            regexp: /^(?=.*[0-9])(?=.*[a-z])(?=.*[@#$%^&+=\.])(?=\S+$).{8,20}$/,
                            message: 'The password is composed of letters and numbers, and contains special characters (except letters, numbers, spaces, and characters), in order to start with numbers or letters, and the length is 8-20.'
                        }

                    }
                },
                confirmPassword: {
                    validators: {
                        notEmpty: {
                            message: 'The confirm password is required and cannot be empty'
                        },
                        identical: {
                            field: 'password',
                            message: 'The password and its confirm are not the same'
                        }
                    }
                }

            }

        });
    });
</script>
</body>
</html>